<!DOCTYPE html>
<html>
<head>
    <title></title>
    #parse("sys/header.html")
</head>
<body>
<div id="station" v-cloak>
    <div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="3">
                    <i-input v-model="q.stationname" placeholder="服务站名" :maxlength="20" @on-enter="query"/>
                </i-col>
                <i-col span="2">
                    <i-input v-model="q.manage" placeholder="管理员" :maxlength="15" @on-enter="query"/>
                </i-col>
                <i-col span="2">
                    <i-input v-model="q.mobile" placeholder="管理员手机" :maxlength="11" @on-enter="query"/>
                </i-col>
                <i-col span="4">
                    <i-input v-model="q.addrinfo" placeholder="详细地址" :maxlength="50" @on-enter="query"/>
                </i-col>
                <i-col span="2">
                    <i-button @click="query" type="primary" icon="ios-search">查询</i-button>
                </i-col>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("station:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("station:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("station:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
                #if($shiro.hasPermission("station:export"))
                <i-button type="info" @click="exportStation"><i class="fa fa-cloud-download"></i>&nbsp;导出</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="station" :rules="ruleValidate" :label-width="100">
            <Form-item  label="区域" prop="regionId">
                <Cascader :data="regions" :load-data="loadRegion" v-model="station.regionId"></Cascader>
            </Form-item>
            <Form-item label="详细地址" prop="addrinfo">
                <i-input v-model="station.addrinfo" placeholder="详细地址" :maxlength="50"/>
            </Form-item>
            <Form-item label="服务站名" prop="stationName">
                <i-input v-model="station.stationName" placeholder="服务站名" :maxlength="20"/>
            </Form-item>
            <Form-item label="管理员" prop="manage">
                <i-input v-model="station.manage" placeholder="管理员" :maxlength="15"/>
            </Form-item>
            <Form-item label="管理员手机" prop="mobile">
                <i-input v-model="station.mobile" placeholder="管理员手机" :maxlength="11"/>
            </Form-item>
            <Form-item label="落地日期" prop="createTime">
                <Date-picker v-model="station.createTime" placeholder="落地日期" type="datetime"></Date-picker>
            </Form-item>
            <Form-item label="运营日期" prop="useTime">
                <Date-picker v-model="station.useTime" placeholder="运营日期" type="datetime"></Date-picker>
            </Form-item>
            <Form-item label="状态" prop="status">
                <Radio-group v-model="station.status">
                    <Radio label="0">
                        <span>停运</span>
                    </Radio>
                    <Radio label="1">
                        <span>运营</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/shop/station.js?_${date.systemTime}"></script>
</body>
</html>
